﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Audio;

namespace COC.Sound
{
	public static class SoundManager
	{
		static Dictionary<string, SoundEffect> m_Sounds = new Dictionary<string, SoundEffect>();

		static public void InitializeSounds(ContentManager content)
		{
			string[] names = new string[] { "FootStep1", "FootStep2", "GunShoot", "Die" };
			foreach (string name in names)
			{
				SoundEffect se = content.Load<SoundEffect>(@"Sound/" + name);
				m_Sounds.Add(name, se);
			}
		}

		static public void PlaySound(string name)
		{
			if (m_Sounds.ContainsKey(name))
			{
				m_Sounds[name].Play();
			}
		}
	}
}